/**
 * @Author 韦建韩
 * @Date 2022/7/9
 */
package com.example.blog.config;

import jdk.nashorn.internal.objects.annotations.Constructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebMVCConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("redirect:/index");
    }
}
